package com.ylfstu.Enum_;

/**
 * @author:Joy_Yang
 * @date:2022/9/26
 * @version:1.0
 */
public class EnumMethod {
    public static void main(String[] args) {
        Season2 summer = Season2.SUMMER;
        System.out.println(summer.name());
        System.out.println(summer.ordinal());

        Season2[] values = Season2.values();
        for (Season2 season : values) {//增强for循环
            System.out.println(season);
        }


        System.out.println(Season2.SUMMER.compareTo(Season2.AUTUMN));

    }
}

